// let api = baseApi + '/buildingInformation'
let api = `${baseApi}buildingInformation`;
/**					
 * @method getBuilding 获取所有楼宇
 * @param {pageSize,pageCount} 分页信息
 * @return axios
 */
export const getBuilding = function(params) {
	return axios.post(`${api}/allHouses`,params)
}	

/**					
 * @method getBuildingName 获取所有楼宇名称 用作下拉
 * @param {pageSize,pageCount} 分页信息
 * @return axios
 */
export const getBuildingName = function() {
	 return axios.get(`${api}/getAll`)
}

/**
 * @method addBuilding 添加楼宇信息
 * @param 楼宇对象
 * @return axios
 */
export const addBuilding = function (params){
	return axios.post(`${api}/addHouses`,params)
}

/**
 * @method getAllByAreaNumberId 根据区域编号id查询楼宇信息
 * @param 楼宇Id
 * @return axios
 */
export const getAllByAreaNumberId = function (params){
	return axios.get(`${api}/getAllByAreaNumberId/`+params)
}

/**
 * @method deleteBuilding 删除楼宇信息
 * @param 楼宇Id
 * @return axios
 */
export const deleteBuilding = function (params){
	return axios.delete(`${api}/deleteHouses/`+params)
}

/**
 * @method getBuildingById 据ID查询楼宇
 * @param 楼宇Id
 * @return axios
 */
export const getBuildingById = function (params){
	return axios.get(`${api}/housesById/`+params)
}

/** 
 * @method getBuildingLikeName 楼宇名模糊查询
 * @param inputString 附带值 page pageSize
 * @return axios 
 */
export const getBuildingLikeName = function (params){
	return axios.post(`${api}/likeBuildingName`,params)
}

/**
 * @method updateHouses 修改楼宇
 * @param 楼宇对象
 * @return axios
 */
export const updateHouses = function (params){
	return axios.put(`${api}/updateHouses`,params)
}

/**
 * @method getAllAreaNumber 查询对应房间
 * @param 楼宇对象
 * @return axios
 */
export const getAllAreaNumber = function (params){
	return axios.get(`${api}/getAllAreaNumber/`+params)
}
